# Get the annual mean temperature
temp <- rast(system.file("extdata/bioclim.tif", package = "sdadata"), lyr = 1)
# Reproject
temp <- temp %>% project("EPSG:3035")
rnaturalearth::ne_countries(returnclass = "sf", scale = 50) %>%
st_transform(3035) %>%
ggplot() +
geom_sf(fill = "lightblue") +
geom_spatraster(data = temp) +
scale_fill_viridis_c("Degree", na.value = NA) +
theme_classic() +
theme(plot.background = element_rect(fill = "transparent", color = NA),
panel.background = element_rect(fill = "transparent", color = NA))